"use strict"

/**
 * 甘肃省自治区采购网爬虫
 *  
 */

var Base = require("./base");
var gs_spider = new Base();
gs_spider.name = "甘肃省采购网";
gs_spider.timeout = 20000;

gs_spider.getPageUrl = function (pg) {
    return "http://ccgp-gansu.gov.cn/web/doSearch.action?limit=20&start=" + pg + "0";

}

gs_spider.getItems = function ($) {
    var items = [];
    $(".Expand_SearchSLisi a").each(function (index, ele) {
        var e = $(ele);
        var item = {};
        item.title = e.text();
        item.url = "http://ccgp-gansu.gov.cn" + e.attr("href");
        item.source = gs_spider.name;
        items.push(item);
    });
    return items;
}

exports = module.exports = gs_spider;